<!-- 
使用方法:
import Button3 from '@/components/button3.vue'

<Button3>
    <div>
        按钮上的文字
    </div>
</Button3> 
-->

<template>
    <div class="btn-3">
        <slot>
        </slot>
    </div>
</template>

<script>
</script>

<style scoped>
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
}

.btn-3 {
    display: inline-block;
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-decoration: none;
    font-family: sans-serif;
    font-weight: 600;
    font-size: 2em;
    padding: 0.75em 1em;
    color: rgb(255, 0, 136);
    border: 0.15em solid rgb(255, 0, 204);
    border-radius: 2em;
    transition: 4s;
}

.btn-3:before,
.btn-3:after {
    content: "";
    position: absolute;
    top: -1.5em;
    z-index: -1;
    width: 200%;
    aspect-ratio: 1;
    border: none;
    border-radius: 40%;
    background-color: rgba(255, 0, 238, 0.25);
    transition: 4s;
}

.btn-3:before {
    left: -80%;
    transform: translate3d(0, 5em, 0) rotate(-340deg);
}

.btn-3:after {
    right: -80%;
    transform: translate3d(0, 5em, 0) rotate(390deg);
}

.btn-3:hover,
.btn-3:focus {
    color: white;
}

.btn-3:hover:before,
.btn-3:hover:after,
.btn-3:focus:before,
.btn-3:focus:after {
    transform: none;
    background-color: rgba(255, 0, 234, 0.75);
}
</style>